package com.vrp3d.domain.dto.news;

import com.vrp3d.common.consts.CommonConst;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 新闻搜索用dto
 *
 * @author vrp3d
 */
@Data
public class NewsSearchDTO implements Serializable {
    private static final long serialVersionUID = -5281610463280439941L;

    @ApiModelProperty(value = "搜索用户输入字段")
    @Size(max = CommonConst.NEWS_NAME_LENGTH, message = "展厅名称长度限制1-" + CommonConst.NEWS_NAME_LENGTH)
    private String name;

    @ApiModelProperty(value = "新闻类型")
    @Range(min = 1, message = "新闻分类值不符合规范")
    private Integer type;
}
